

GXX = @echo compiling $@ && g++
LINK = @echo lingking $@ && g++
CFLAGS = -g -Wall -W
DEFINE = -DDEBUG
INCLUDE = -I./
LIBS = 
OUTPUTDIR = ../bin
#如果需要其他头文件路径,就把下面的改一下
INCLUDE += -Icommon/

#如果需要其他库,就把下面的改一下
#LIBS += -L./path/ -lname

OBJECTS = main.o \
		 #othersrc.o


TARGET = main

$(TARGET) : $(OBJECTS)
	$(LINK) $(CFLAGS) $(DEFINE) -o $@ $^ $(LIBS)

.cpp.o:
	$(GXX) -c $(CFLAGS) $(DEFINE) $(INCLUDE) -o $@ $<

install:
	cp $(TARGET) $(OUTPUTDIR)  
clean:
	rm -rf $(TARGET) *.o *.swp
